package com.core.website.service.impl;

import com.core.website.entity.CoreDutyRecordMonitoring;
import com.core.website.mapper.CoreDutyRecordMonitoringMapper;
import com.core.website.service.CoreDutyRecordMonitoringService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;
import java.util.UUID;
@Service
public class CoreDutyRecordMonitoringServiceImpl implements CoreDutyRecordMonitoringService {
    @Autowired
    CoreDutyRecordMonitoringMapper dutyRecordMonitoringMapper;
    @Override
    public String insertCoreDutyRecordMonitoring(CoreDutyRecordMonitoring dutyRecordMonitoring) {
        dutyRecordMonitoring.setId(UUID.randomUUID().toString().toUpperCase().replace("-", ""));
        dutyRecordMonitoringMapper.insertCoreDutyRecordMonitoring(dutyRecordMonitoring);
        return dutyRecordMonitoring.getId();
    }

    @Override
    public List<CoreDutyRecordMonitoring> selectCoreDutyRecordMonitoringList(String contentId) {
        return dutyRecordMonitoringMapper.selectCoreDutyRecordMonitoringList(contentId);
    }

    @Override
    public CoreDutyRecordMonitoring selectCoreDutyRecordMonitoringById(String id) {
        return dutyRecordMonitoringMapper.selectCoreDutyRecordMonitoringById(id);
    }

    @Override
    public int updateCoreDutyRecordMonitoring(CoreDutyRecordMonitoring dutyRecordMonitoring) {
        return dutyRecordMonitoringMapper.updateCoreDutyRecordMonitoring(dutyRecordMonitoring);
    }

    @Override
    public int deleteCoreDutyRecordMonitoring(String id) {
        return dutyRecordMonitoringMapper.deleteCoreDutyRecordMonitoring(id);
    }
}
